\(\int \sec ^5(e+f x) (a+b \sin ^2(e+f x))^{3/2} \, dx\) [338]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [F(-1)]
   Mupad [F(-1)]

Optimal result

Integrand size = 25, antiderivative size = 122 \[ \int \sec ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\frac {3 a^2 \text {arctanh}\left (\frac {\sqrt {a+b} \sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}}\right )}{8 \sqrt {a+b} f}+\frac {3 a \sec (e+f x) \sqrt {a+b \sin ^2(e+f x)} \tan (e+f x)}{8 f}+\frac {\sec ^3(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \tan (e+f x)}{4 f} \]

[Out]

3/8*a^2*arctanh(sin(f*x+e)*(a+b)^(1/2)/(a+b*sin(f*x+e)^2)^(1/2))/f/(a+b)^(1/2)+1/4*sec(f*x+e)^3*(a+b*sin(f*x+e
)^2)^(3/2)*tan(f*x+e)/f+3/8*a*sec(f*x+e)*(a+b*sin(f*x+e)^2)^(1/2)*tan(f*x+e)/f

Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3269, 386, 385, 212} \[ \int \sec ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\frac {3 a^2 \text {arctanh}\left (\frac {\sqrt {a+b} \sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}}\right )}{8 f \sqrt {a+b}}+\frac {\tan (e+f x) \sec ^3(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2}}{4 f}+\frac {3 a \tan (e+f x) \sec (e+f x) \sqrt {a+b \sin ^2(e+f x)}}{8 f} \]

[In]

Int[Sec[e + f*x]^5*(a + b*Sin[e + f*x]^2)^(3/2),x]

[Out]

(3*a^2*ArcTanh[(Sqrt[a + b]*Sin[e + f*x])/Sqrt[a + b*Sin[e + f*x]^2]])/(8*Sqrt[a + b]*f) + (3*a*Sec[e + f*x]*S
qrt[a + b*Sin[e + f*x]^2]*Tan[e + f*x])/(8*f) + (Sec[e + f*x]^3*(a + b*Sin[e + f*x]^2)^(3/2)*Tan[e + f*x])/(4*
f)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 386

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Simp[(-x)*(a + b*x^n)^(p + 1)*(
(c + d*x^n)^q/(a*n*(p + 1))), x] - Dist[c*(q/(a*(p + 1))), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^(q - 1), x], x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[n*(p + q + 1) + 1, 0] && GtQ[q, 0] && NeQ[p, -1]

Rule 3269

Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, Sin[e +
f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (a+b x^2\right )^{3/2}}{\left (1-x^2\right )^3} \, dx,x,\sin (e+f x)\right )}{f} \\ & = \frac {\sec ^3(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \tan (e+f x)}{4 f}+\frac {(3 a) \text {Subst}\left (\int \frac {\sqrt {a+b x^2}}{\left (1-x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{4 f} \\ & = \frac {3 a \sec (e+f x) \sqrt {a+b \sin ^2(e+f x)} \tan (e+f x)}{8 f}+\frac {\sec ^3(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \tan (e+f x)}{4 f}+\frac {\left (3 a^2\right ) \text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \sqrt {a+b x^2}} \, dx,x,\sin (e+f x)\right )}{8 f} \\ & = \frac {3 a \sec (e+f x) \sqrt {a+b \sin ^2(e+f x)} \tan (e+f x)}{8 f}+\frac {\sec ^3(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \tan (e+f x)}{4 f}+\frac {\left (3 a^2\right ) \text {Subst}\left (\int \frac {1}{1-(a+b) x^2} \, dx,x,\frac {\sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}}\right )}{8 f} \\ & = \frac {3 a^2 \text {arctanh}\left (\frac {\sqrt {a+b} \sin (e+f x)}{\sqrt {a+b \sin ^2(e+f x)}}\right )}{8 \sqrt {a+b} f}+\frac {3 a \sec (e+f x) \sqrt {a+b \sin ^2(e+f x)} \tan (e+f x)}{8 f}+\frac {\sec ^3(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \tan (e+f x)}{4 f} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.12 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.52 \[ \int \sec ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\frac {a^2 \operatorname {Hypergeometric2F1}\left (\frac {1}{2},3,\frac {3}{2},\frac {(a+b) \sin ^2(e+f x)}{a+b \sin ^2(e+f x)}\right ) \sin (e+f x)}{f \sqrt {a+b \sin ^2(e+f x)}} \]

[In]

Integrate[Sec[e + f*x]^5*(a + b*Sin[e + f*x]^2)^(3/2),x]

[Out]

(a^2*Hypergeometric2F1[1/2, 3, 3/2, ((a + b)*Sin[e + f*x]^2)/(a + b*Sin[e + f*x]^2)]*Sin[e + f*x])/(f*Sqrt[a +
 b*Sin[e + f*x]^2])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(405\) vs. \(2(106)=212\).

Time = 1.39 (sec) , antiderivative size = 406, normalized size of antiderivative = 3.33

method result size
default \(\frac {3 a^{2} \left (\ln \left (\frac {2 \sqrt {a +b}\, \sqrt {a +b -b \left (\cos ^{2}\left (f x +e \right )\right )}+2 b \sin \left (f x +e \right )+2 a}{\sin \left (f x +e \right )-1}\right ) a^{2}+2 \ln \left (\frac {2 \sqrt {a +b}\, \sqrt {a +b -b \left (\cos ^{2}\left (f x +e \right )\right )}+2 b \sin \left (f x +e \right )+2 a}{\sin \left (f x +e \right )-1}\right ) a b +\ln \left (\frac {2 \sqrt {a +b}\, \sqrt {a +b -b \left (\cos ^{2}\left (f x +e \right )\right )}+2 b \sin \left (f x +e \right )+2 a}{\sin \left (f x +e \right )-1}\right ) b^{2}-\ln \left (\frac {2 \sqrt {a +b}\, \sqrt {a +b -b \left (\cos ^{2}\left (f x +e \right )\right )}-2 b \sin \left (f x +e \right )+2 a}{1+\sin \left (f x +e \right )}\right ) a^{2}-2 \ln \left (\frac {2 \sqrt {a +b}\, \sqrt {a +b -b \left (\cos ^{2}\left (f x +e \right )\right )}-2 b \sin \left (f x +e \right )+2 a}{1+\sin \left (f x +e \right )}\right ) a b -\ln \left (\frac {2 \sqrt {a +b}\, \sqrt {a +b -b \left (\cos ^{2}\left (f x +e \right )\right )}-2 b \sin \left (f x +e \right )+2 a}{1+\sin \left (f x +e \right )}\right ) b^{2}\right ) \left (\cos ^{4}\left (f x +e \right )\right )+2 \sqrt {a +b -b \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (a +b \right )^{\frac {5}{2}} \left (3 a -2 b \right ) \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right )+4 \sqrt {a +b -b \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (a +b \right )^{\frac {7}{2}} \sin \left (f x +e \right )}{16 \left (a +b \right )^{\frac {5}{2}} \cos \left (f x +e \right )^{4} f}\) \(406\)

[In]

int(sec(f*x+e)^5*(a+b*sin(f*x+e)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/16*(3*a^2*(ln(2/(sin(f*x+e)-1)*((a+b)^(1/2)*(a+b-b*cos(f*x+e)^2)^(1/2)+b*sin(f*x+e)+a))*a^2+2*ln(2/(sin(f*x+
e)-1)*((a+b)^(1/2)*(a+b-b*cos(f*x+e)^2)^(1/2)+b*sin(f*x+e)+a))*a*b+ln(2/(sin(f*x+e)-1)*((a+b)^(1/2)*(a+b-b*cos
(f*x+e)^2)^(1/2)+b*sin(f*x+e)+a))*b^2-ln(2/(1+sin(f*x+e))*((a+b)^(1/2)*(a+b-b*cos(f*x+e)^2)^(1/2)-b*sin(f*x+e)
+a))*a^2-2*ln(2/(1+sin(f*x+e))*((a+b)^(1/2)*(a+b-b*cos(f*x+e)^2)^(1/2)-b*sin(f*x+e)+a))*a*b-ln(2/(1+sin(f*x+e)
)*((a+b)^(1/2)*(a+b-b*cos(f*x+e)^2)^(1/2)-b*sin(f*x+e)+a))*b^2)*cos(f*x+e)^4+2*(a+b-b*cos(f*x+e)^2)^(1/2)*(a+b
)^(5/2)*(3*a-2*b)*cos(f*x+e)^2*sin(f*x+e)+4*(a+b-b*cos(f*x+e)^2)^(1/2)*(a+b)^(7/2)*sin(f*x+e))/(a+b)^(5/2)/cos
(f*x+e)^4/f

Fricas [A] (verification not implemented)

none

Time = 0.67 (sec) , antiderivative size = 413, normalized size of antiderivative = 3.39 \[ \int \sec ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\left [\frac {3 \, \sqrt {a + b} a^{2} \cos \left (f x + e\right )^{4} \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 8 \, {\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - 4 \, {\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - 2 \, a - 2 \, b\right )} \sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {a + b} \sin \left (f x + e\right ) + 8 \, a^{2} + 16 \, a b + 8 \, b^{2}}{\cos \left (f x + e\right )^{4}}\right ) + 4 \, {\left ({\left (3 \, a^{2} + a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 2 \, a^{2} + 4 \, a b + 2 \, b^{2}\right )} \sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sin \left (f x + e\right )}{32 \, {\left (a + b\right )} f \cos \left (f x + e\right )^{4}}, -\frac {3 \, a^{2} \sqrt {-a - b} \arctan \left (\frac {{\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - 2 \, a - 2 \, b\right )} \sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {-a - b}}{2 \, {\left ({\left (a b + b^{2}\right )} \cos \left (f x + e\right )^{2} - a^{2} - 2 \, a b - b^{2}\right )} \sin \left (f x + e\right )}\right ) \cos \left (f x + e\right )^{4} - 2 \, {\left ({\left (3 \, a^{2} + a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 2 \, a^{2} + 4 \, a b + 2 \, b^{2}\right )} \sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sin \left (f x + e\right )}{16 \, {\left (a + b\right )} f \cos \left (f x + e\right )^{4}}\right ] \]

[In]

integrate(sec(f*x+e)^5*(a+b*sin(f*x+e)^2)^(3/2),x, algorithm="fricas")

[Out]

[1/32*(3*sqrt(a + b)*a^2*cos(f*x + e)^4*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 8*(a^2 + 3*a*b + 2*b^2)*co
s(f*x + e)^2 - 4*((a + 2*b)*cos(f*x + e)^2 - 2*a - 2*b)*sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(a + b)*sin(f*x +
e) + 8*a^2 + 16*a*b + 8*b^2)/cos(f*x + e)^4) + 4*((3*a^2 + a*b - 2*b^2)*cos(f*x + e)^2 + 2*a^2 + 4*a*b + 2*b^2
)*sqrt(-b*cos(f*x + e)^2 + a + b)*sin(f*x + e))/((a + b)*f*cos(f*x + e)^4), -1/16*(3*a^2*sqrt(-a - b)*arctan(1
/2*((a + 2*b)*cos(f*x + e)^2 - 2*a - 2*b)*sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(-a - b)/(((a*b + b^2)*cos(f*x +
 e)^2 - a^2 - 2*a*b - b^2)*sin(f*x + e)))*cos(f*x + e)^4 - 2*((3*a^2 + a*b - 2*b^2)*cos(f*x + e)^2 + 2*a^2 + 4
*a*b + 2*b^2)*sqrt(-b*cos(f*x + e)^2 + a + b)*sin(f*x + e))/((a + b)*f*cos(f*x + e)^4)]

Sympy [F(-1)]

Timed out. \[ \int \sec ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\text {Timed out} \]

[In]

integrate(sec(f*x+e)**5*(a+b*sin(f*x+e)**2)**(3/2),x)

[Out]

Timed out

Maxima [F]

\[ \int \sec ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\int { {\left (b \sin \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}} \sec \left (f x + e\right )^{5} \,d x } \]

[In]

integrate(sec(f*x+e)^5*(a+b*sin(f*x+e)^2)^(3/2),x, algorithm="maxima")

[Out]

integrate((b*sin(f*x + e)^2 + a)^(3/2)*sec(f*x + e)^5, x)

Giac [F(-1)]

Timed out. \[ \int \sec ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\text {Timed out} \]

[In]

integrate(sec(f*x+e)^5*(a+b*sin(f*x+e)^2)^(3/2),x, algorithm="giac")

[Out]

Timed out

Mupad [F(-1)]

Timed out. \[ \int \sec ^5(e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\int \frac {{\left (b\,{\sin \left (e+f\,x\right )}^2+a\right )}^{3/2}}{{\cos \left (e+f\,x\right )}^5} \,d x \]

[In]

int((a + b*sin(e + f*x)^2)^(3/2)/cos(e + f*x)^5,x)

[Out]

int((a + b*sin(e + f*x)^2)^(3/2)/cos(e + f*x)^5, x)